from selenium import webdriver
from time import sleep

from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("file:///C:/Users/Administrator/Desktop/t2.html")
driver.maximize_window()
for i in range(100) :
  driver.find_element(By.CSS_SELECTOR,"button").click()
  sleep(0.5)
  js = f"window.scrollTo(0,{i * 100})"
  driver.execute_script(js)
sleep(1)
driver.quit()
